
const path = require('path')
module.exports = {
    mode: 'none',
    entry: './src/main.js',
    output: {
        filename: 'bunder.js',
        path: path.join(__dirname, 'dist'),
        publicPath: 'dist/'
    },
    module:{
        rules:[ // 其他资源加载器 loader
            {
                test: /.js$/,
                use: {
                    loader:'babel-loader',
                    options:{
                        presets:['@babel/preset-env']
                    }
                }
            },
            {
                test: /.css$/,
                use:[ //从后往前执行
                    'style-loader',
                    'css-loader'
                ]
            },
            {
                test: /.png$/,
                use:{
                    loader: 'url-loader',
                    options:{
                        limit: 10 * 1024 // 10 KB
                    }
                }
            }
        ]
    }
}